<template>
    <div class="Equipment">
        <div class="CellList">
            <div class="CellList_top">
                <span class="title">小区列表</span>
                <el-select v-model="value" placeholder="请选择">
                    <el-option
                            v-for="item in options"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value">
                    </el-option>
                </el-select>
            </div>
            <hr/>
            <div class="content">
                <div v-for="(item,index) in list"
                     :key="index"
                     class="items"
                >
                    <img src="" alt="" class="items_img">
                    <div class="items_box">
                        <p class="items_title">{{item.title}}</p>
                        <span class="items_areas">{{item.area}}</span> <span class="items_areas">建成年代：{{item.time}}</span>
                        <p class="items_company">{{item.company}}</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="right">
            <el-row>
                <el-col :span="24">
                    <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" >
                        <el-menu-item index="1">
                            <span slot="title" @click="pushCallDetails">美颂花园详情</span>
                        </el-menu-item>
                        <el-menu-item index="2">
                            <span slot="title" @click="pushList"> 设备列表</span>
                        </el-menu-item>
                    </el-menu>
                </el-col>
            </el-row>
            <router-view></router-view>
        </div>
    </div>
</template>

<script>
    export default {
        name: "Equipment",
        data(){
            return {
                options: [
                    {
                        value: '选项1',
                        label: '全部街道'
                    }, {
                        value: '选项2',
                        label: '双皮奶'
                    }, {
                        value: '选项3',
                        label: '蚵仔煎'
                    }, {
                        value: '选项4',
                        label: '龙须面'
                    }, {
                        value: '选项5',
                        label: '北京烤鸭'
                    }],
                list:[
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    {
                        title:'美颂花园',
                        area:'独墅湖街道',
                        time:"2018",
                        company:'苏州新城悦物业服务有限公司'
                    },
                    ],
                value:'选项1',
                activeIndex: '1',
            }
        },
        mounted(){
            this.pushCallDetails()
        },
        methods: {
            pushCallDetails(){
                this.$router.push({
                    name:'CallDetails'
                })
            },
            pushList(){
                this.$router.push({
                    name:'List'
                })
            }
        }
    }
</script>

<style scoped lang="less">
    .Equipment{
        display: flex;
        justify-content: space-around;
        .CellList{
            width: 390px;
            height: 822px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.06);
            .CellList_top{
                height: 50px;
                display: flex;
                align-items: center;
                justify-content: space-around;
                span{
                    font-size: 14px;
                    font-family: PingFang SC, PingFang SC-Bold;
                    font-weight: 700;
                    text-align: left;
                    color: #000000;
                }
            }
            .content{
                display: flex;
                flex-direction: column;
                align-items: center;
                overflow:auto;
                max-height: 750px;
            }
            .items{
                width: 390px;
                height: 108px;
                background: #f8f8f8;
                display: flex;
                align-items: center;
                margin-top: 16px;
                .items_img{
                    width: 92px;
                    height: 92px;
                    background: rgba(0,0,0,0.00);
                    margin-right: 12px;
                    margin-left: 30px;
                }
                .items_title{
                    font-size: 14px;
                    font-family: PingFang SC, PingFang SC-Bold;
                    font-weight: 700;
                    text-align: left;
                    color: #000000;
                }
                .items_areas{
                    font-size: 12px;
                    font-family: PingFang SC, PingFang SC-Regular;
                    font-weight: 400;
                    text-align: left;
                    color: #000000;
                }
                span:nth-child(1){
                    margin-left: 24px;
                }
                .items_company{
                    font-size: 12px;
                    font-family: PingFang SC, PingFang SC-Regular;
                    font-weight: 400;
                    text-align: left;
                    color: #2868e8;
                }
            }


        }
        .right{
            width: 1230px;
            height: 822px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.06);
        }
    }
</style>
